home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CBM Funet Archive
/
cbm-funet-archive-2003.iso
/
cbm
/
demodisks
/
drives
/
1581-demo.lzh
/
auto-boot 128
(
.txt
)
next >
Wrap
Commodore BASIC
|
1994-10-19
|
2KB
|
89 lines
100 print"[147][155] [192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]"
102 print" [159]auto-boot maker"
104 print"[155] [192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]"
105 poke53280,0:poke53281,0:rem by bowen&ryan
106 x=peek(48):if(x>=8)then1990
107 gosub2125
108 nu$=chr$(0)
110 : input#15,a,aa$,c,d:if(a>0)thengosub242:goto100
112 open8,u,8,"#"
114 print#15,"u1:8 0 18 0":print#15,"b-p";8;5
116 : get#8,ba$:bl$=""
118 print#15,"u1:8 0 1 0":input#15,a,aa$,c,d:ifa<>0thengosub242:goto100
120 : fori=0to24: get#8,a$: bl$=bl$+chr$(asc(a$)): next
122 if (asc(ba$)and1)=0 then (NULL)
124 : if left$(bl$,3)="cbm" then (NULL)
126 : print" [155] already a boot disk: ":print"";
128 : i=8
130 : (NULL)
132 : a$=mid$(bl$,i,1)
134 : printa$;
136 : i=i+1
138 : (NULL) (NULL) a$=nu$
140 : print
142 : (NULL): (NULL) (NULL)
144 : print" [155] boot sector used "
146 : print" by another program "
148 : (NULL)
150 : print" [155] continue (y/n) ":input"n[157][157][157]";a$
152 : if a$<>"y" then e=-1: goto238
154 : ba = -1
156 (NULL)
158 print" [155] enter your program's name "
160 print" (up to 16 characters) "
162 input" startup[157][157][157][157][157][157][157][157][157]";f$
164 :
166 iflen(f$)>16 then (NULL)
168 : print" that's too big!";
170 : (NULL)2
172 : goto162
174 : (NULL)
176 iff$=""thenend
178 :
180 print"[155] enter your program's type "
182 print" ('basic' or 'binary') "
184 input" basic[157][157][157][157][157][157][157]";t$
186 :
188 if t$<>"basic" and t$ <> "binary" then (NULL)
190 : print" enter 'basic' or 'binary'";
192 : (NULL)2
194 : print"[145][145][145]"chr$(27)"@[145]"
196 : goto184
198 : (NULL)
200 if t$="basic" then rm$="run" : (NULL) rm$="boot"
202 :
204 print"[155] insert your disk into "
206 print" drive "u"[157]. press return "
208 print" when ready. ";
210 get(NULL)a$: if asc(a$)<>13 then e=-1: goto238
212 :
214 aa= len(f$)+(NULL)("b00")+15
216 al= aa and 255: ah= aa / 256
218 :
220 print#15,"b-p 8 0"
222 print#8, "cbm";nu$;nu$;nu$;nu$;f$;nu$;nu$;
224 print#8, chr$(162);chr$(al);chr$(160);chr$(ah);
226 print#8, chr$(76);chr$((NULL)("a5"));chr$((NULL)("af"));
228 print#8, rm$;chr$(34);f$;nu$
230 print#15, "u2:8 0 1 0"
232 if ba=0 then print#15, "b-a 0 1 0"
234 a$=ds$:ifds>0thengosub242:goto100
236 :
238 close8: close15
240 end
242 print:print"[155] disk error: ":close8:close15
244 print""a","aa$","c","d:e=-1:print"[155]press any key to continue":get(NULL)g$:return
1990 print"[155]sorry, this program will"
1992 print"run on the c-128 only.":end
2000 rem
2010 rem
2125 print "[155] disk unit nr (8-15) "
2130 input"8[157][157][157]";u: if u<8 or u>15 then print "[145][145][145][145]": goto 125
2155 print "[155] insert disk in unit"u"[157], d"right$(str$(d),1)";"
2160 print " press any key when ready. "
2165 get x$: if x$=""then2165
2166 open15,u,15,"i0"
2170 print"[145][145][145][145][145][145][145]":bl$=" "
2175 printbl$:printbl$:printbl$:printbl$:printbl$:printbl$:print"[145][145][145][145][145][145][145]"
2180 return